package com.ha8.netease
{
	import com.ha8.netease.models.vo.UserModel;
	import com.ha8.netease.models.vo.ViewModel;
	import com.ha8.netease.views.components.AlertWindow;
	import com.ha8.netease.views.components.UpdateWindow;

	/**
	 * 全局变量保存类
	 * 
	 * @author rogo
	 */	
	public class App
	{
		public function App()
		{
		}
		
		//--------------------------------------------------------------------------
		//
		//  Constants
		//
		//--------------------------------------------------------------------------
		
		public static const APP_KEY:String = 'iIUYRqaPMp1WgY1a';
		public static const APP_SECRET:String = 'jDfu5UEul2jT9s7SEvBZftDdnZd2whpi';
		
		public static const PAGE_SIZE:String = '20';
		public static const REFRESH_INTERVAL:Number = 60000;
		public static const UPDATE_URL:String = 'http://rogosteam.sinaapp.com/config/netease_update.xml';
		
		//--------------------------------------------------------------------------
		//
		//  Variables
		//
		//--------------------------------------------------------------------------
		
		private static var instance:App;
		
		/**
		 * 当前登录的用户信息 
		 */		
		public var me:UserModel;
		
		/**
		 * 微博列表页
		 */		
		public var blogListModel:ViewModel;
		
		/**
		 * 用户列表页 
		 */		
		public var userListModel:ViewModel;
		
		/**
		 * 个人资料页 
		 */		
		public var profileModel:ViewModel;
		
		/**
		 * 消息提示窗口 
		 */		
		public var alertWindow:AlertWindow;
		
		public var updateWindow:UpdateWindow = null;
		
		//--------------------------------------------------------------------------
		//
		//  Methods
		//
		//--------------------------------------------------------------------------
		
		public static function getInstance():App
		{
			if (!instance)
				instance = new App();
			return instance;
		}
	}
}